package ZuoYe19;

import java.sql.SQLOutput;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

public class ListTest {
    public static void main(String[] args) {
        List list = new ArrayList();
        list.add("111");
        list.add("222");
        list.add("333");
        list.add("444");
        list.add("55");
        list.add("66");
        list.add("333");
        String a = "222";
        System.out.println(list.size());
        Object o = list.get(2);
        System.out.println("第三个是" + o);
        System.out.println(">>>>>>>>>");
        for (int i = 0; i < list.size(); i++) {
            System.out.println(list.get(i));
        }
        System.out.println("增强for");
        for (Object oo : list)
            System.out.println(oo);
        System.out.println(list.contains(a));
        System.out.println(list.remove(3));
        for (Object oo : list)
            System.out.println(oo + "");
        System.out.println();
        System.out.println(list.indexOf("66"));


    }
}
